package net.lunjin.dao.impl;

import net.lunjin.bean.BlackList;
import net.lunjin.dao.BlackListDao;

public class BlackListDaoImpl extends MiddleAbstractDao<BlackList> implements BlackListDao {
	
	@Override
	protected Class<BlackList> getEntityClass() {
		return BlackList.class;
	}
	
	@Override
	public boolean isBlackList(String ip) throws Exception {
		int cnt  = super.getIntBySql("select count(1) from blacklist where ip = '"+ip+"'");
		return cnt==0?false:true;
	}

	
}
